var MongoClient = require('mongodb').MongoClient
var url = "mongodb://localhost:27017/"

// 插入多条数据
MongoClient.connect(url, {useNewUrlParser: true, useUnifiedTopology: true}, function(err, db){
  if (err) throw err
  var dbo = db.db("laochen")
  // 查询条件
  // var whereStr = {"username": "老陈"}
  var whereStr = {"username": {
    $in: ["老陈", "陈老"]
  }}
  dbo.collection("users").find(whereStr).toArray(function(err, result) {
    if (err) throw err
    console.log(result);
    db.close()
  })

})






